package com.example.baselibs.net.service;

import com.example.baselibs.entity.Result;
import com.example.baselibs.entity.bean.UpdatedInfo;
import com.example.baselibs.entity.bean.UserInfo;
import com.example.baselibs.net.NetConstant;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface UserApi {
    /*登录*/
    @POST(NetConstant.USER_SECOND_URL + "selStr=select&table=user")
    Observable<Result<UserInfo>> login(@Query("W") String user);

    /*登录*/
    @POST(NetConstant.USER_SECOND_URL)
    Observable<Result> synclogin(@QueryMap Map<String, String> map);

    /*下载最新的apk*/
    @POST(NetConstant.USER_SECOND_URL + "selStr=select&table=soft_install")
    Observable<Result<UpdatedInfo>> install(@QueryMap Map<String,String> map);
}
